﻿@model List<Comment>
@using LiteBlog
@{
    this.ViewBag.Title = "Recent Comments";
    this.Layout = "~/Views/Shared/_SiteLayout.cshtml";
}

@section ScriptSection
{
    <script type="text/javascript">
        $(function () {
            var comments = @Html.Json(Model);
            var commentsVm = new CommentsVm();
            commentsVm.loadJson(comments);
            commentsVm.showPostLink(true);
            var pageElem = document.getElementById("page");
            ko.cleanNode(pageElem);
            ko.applyBindings(commentsVm, pageElem);
        });
    </script>
}

<div class="content">
    <h1>Recent Comments</h1>
    @Html.Partial("CommentListControl")
</div>



